<?php
/**
* @package Santic
* @author Anor <rpg@santic.pl>
* @license GNU/GPL
* @version 0.2
* @copyright (C) 2006-2009 Santic.pl Powered by Santic Engine based on Vallheru Engine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*
*
*/

require_once("includes/head.php");

require_once("languages/pl/head1.php");

//losowanie headera
if (ereg("^layout*", $player -> style))
{
$stylll = str_replace("layout", "", $player -> style);
$stylll = str_replace(".css", "", $stylll);
    $path = 'images/'.$stylll.'/';
    $dir = opendir($path);
    $arrnamea = array();
    $r = 0;
    while ($file = readdir($dir)) 
    {
        if (ereg("_.png*$", $file) && ereg("gotowy", $file)) 
        {
            $arrnamea[$r] = $file;
            $r = $r + 1;
        }
    }
    closedir($dir);
$obrazekved = $path.$arrnamea[rand(0, $r-1)];
//$smarty -> assign (array ("obrazekved" => $path.$arrnamea[rand(0, $r-1)],
//                                "stylll" => $stylll));
}

echo ('<?xml version="1.0" encoding="'.$charset.'"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'.$gamename.' :: '.$title.'</title>
<link rel="icon" href="images/fav.gif" type="image/gif" >
<link type="text/css" rel="stylesheet" href="css/'.$player -> style.'" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<Script language="JavaScript" src="js/overlib.js"></script>');
if(substr_count($_SERVER['HTTP_USER_AGENT'], "irefox")!=0 && $player -> ajax == 'T') {
echo('<script type="text/javascript" src="js/jquery.js"></script>
<Script language="JavaScript" src="js/livequery.js"></script>
<Script language="JavaScript" src="js/history.js"></script>
<Script language="JavaScript" src="js/link.js"></script>');
} else {
$_GET['ajax'] = '';
}
echo ('<!--<Script language="JavaScript" src="js/overlib_fade.js"></script>
<Script language="JavaScript" src="js/mintAjax.js"></script>-->
</head>
<body style="background-image: url(images/maletlo.gif); ">
<div id="ladowanie" style="position: fixed; left:5px; top:5px; display: none"><img src="images/ajax-loader.gif"></div>
<center><div class="logo" align="center" style="background: url('.$obrazekved.')"></div></center>
<table width="852" class="td" cellpadding="0" cellspacing="0" align="center">
	<tr>
	<td valign="top" width="226">
	<div id="head_ajax">');

require_once("head_ajax.php");

echo ('
		</td>
		<td width="400" valign="top">
			<div class="maintop"></div><div class="mainmiddle">
			<table cellpadding="0" cellspacing="0" class="td" width="100%">
				<tr>
				<td align="left"></div>
<div id="load">');

?>